'use strict';
const fs = require('fs');
const pako = require('./pako.min.js');

const txt = fs.readFileSync('data.json', 'utf8');
const data = JSON.parse(txt);
const compressed = Buffer.from(
  pako.deflate(JSON.stringify(data))
).toString('base64');

fs.writeFileSync(
  'save.txt',
  "7a990d405d2c6fb93aa8fbb0ec1a3b23" + compressed,
  'utf8'
);
